extends layout.pug

block content
  div.row
    div.col-sm-offset-2.col-md-8
      article.article-body
        header
          h1(style="margin-bottom: 4px;")
            a.article-title= article.title
        div.article-meta(style="margin-bottom: 0px;")
          if (article.top)
            span.text-danger
              i.fa.fa-angellist
              = " 已置顶(^.^)"
          time.article-datetime
            i.fa.fa-calendar(aria-hidden="true")
            = " " + article.time
          div.pull-right
            if (login)
              span.article-delete(data-del=JSON.stringify({title: article.title, id: article.id}))
                i.fa.fa-close(aria-hidden="true")
                = " 删除"
              a.article-update(href="/admin?update=" + article.id)
                i.fa.fa-pencil(aria-hidden="true")
                = " 编辑"
        hr
        div.article-inner
          != article.content
          p.text-left(style="margin-top: 10px")
        footer.article-footer
          ul.tags-list
            - var tags = article.tags || [];
            - for (var j=0; j<tags.length; j++)
              - var name = tags[j];
                li.tag-item
                  a.tag-link(href="/tag/" + name)= name
